#ifndef __D_SNAKE_MANAGER_H__
#define __D_SNAKE_MANAGER_H__

#include "Snake/ISnakeManager.h"
#include "Snake/ISnakeConnector.h"

class DSnake;

class DSnakeManager : public ISnakeManager
{
public:
	// == Life Cycle == //
	DSnakeManager();
	~DSnakeManager();

	bool						Init(void* pConnector);
	void						UnInit();
	void						Release();

	// == Schedule == //
	void						Tick();

	// == Manipulation == //
	ISnake*						AddSnake(DWORD dwID);
	ISnake*						GetSnake(DWORD dwID);
	bool						DelSnake(DWORD dwID);

public:
	typedef	std::map<DWORD /*dwID*/, DSnake* /*pSnake*/>	MAP_SNAKE;
	typedef std::pair<MAP_SNAKE::iterator, bool>			MAP_SNAKE_RET;

private:
	snake::ISnakeConnector*		m_pConnector;

	MAP_SNAKE					m_mapSnake;
};

#endif // __D_SNAKE_MANAGER_H__ [5/14/2013 kch08]